From 8ac7245ad42c15b68c1d3c600324d6e3342f63a1 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Thu, 13 Aug 2026 15:14:27 +0000 Subject: [PATCH] Improve error message --- db/schemas/lib/triggers/create/biography_data.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/schemas/lib/triggers/create/biography_data.m4 b/db/schemas/lib/triggers/create/biography_data.m4 index 2382d97..61f5222 100644 --- a/db/schemas/lib/triggers/create/biography_data.m4 +++ b/db/schemas/lib/triggers/create/biography_data.m4 @@ -514,6 +514,7 @@ CREATE OR REPLACE FUNCTION biography_data_func () BEGIN -- The individual must be female to have a record of sexual swelling + -- on SWELLING_SOURCES. IF NEW.sex <>'sdb_female' AND OLD.sex = 'sdb_female' THEN SELECT swelling_sources.id, swelling_sources.date @@ -529,7 +530,7 @@ CREATE OR REPLACE FUNCTION biography_data_func () RAISE EXCEPTION integrity_constraint_violation USING MESSAGE = 'Error on UPDATE of BIOGRAPHY_DATA' , DETAIL = 'An individual cannot have records of sexual swelling' - || ' unless they are female' + || ' on SWELLING_SOURCES unless they are female' || ': Key (AnimID) = (' || NEW.animid || '), Value (Sex) = (' -- 2.34.1